<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>3dchess: Model Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">3dchess
   </div>
   <div id="projectbrief">Basic chess application with OpenGL graphics and AI</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="class_model-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Model Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Representing a chess figure (e.g.  
 <a href="class_model.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_model_8h_source.html">Model.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_model_1_1_position.html">Position</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure for the model's world coordinates.  <a href="struct_model_1_1_position.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aacca359f52db22626d236f108da4f087"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#aacca359f52db22626d236f108da4f087">Color</a> { <b>BLACK</b>, 
<b>WHITE</b>
 }</td></tr>
<tr class="memdesc:aacca359f52db22626d236f108da4f087"><td class="mdescLeft">&#160;</td><td class="mdescRight">Possible model colors. <br/></td></tr>
<tr class="separator:aacca359f52db22626d236f108da4f087"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:acc072b537a6806019759cd562d80a25e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#acc072b537a6806019759cd562d80a25e">Model</a> (std::string file)</td></tr>
<tr class="memdesc:acc072b537a6806019759cd562d80a25e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads the model from the filesystem.  <a href="#acc072b537a6806019759cd562d80a25e">More...</a><br/></td></tr>
<tr class="separator:acc072b537a6806019759cd562d80a25e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0013070ceabb6f7b3faf5888e617553"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac0013070ceabb6f7b3faf5888e617553"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#ac0013070ceabb6f7b3faf5888e617553">loadScene</a> ()</td></tr>
<tr class="memdesc:ac0013070ceabb6f7b3faf5888e617553"><td class="mdescLeft">&#160;</td><td class="mdescRight">Imports the model from filesystem. <br/></td></tr>
<tr class="separator:ac0013070ceabb6f7b3faf5888e617553"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a792de900907e4e86c48e4a660c9fb24b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a792de900907e4e86c48e4a660c9fb24b">setCorrectionValues</a> (int localX, int localY, int localZ, float scaleFactor, int rotateX, int rotateY, int rotateZ)</td></tr>
<tr class="memdesc:a792de900907e4e86c48e4a660c9fb24b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Corrects the model positioning if the model (in the given file) is not proper located at 0/0/0 local space coordinates, the rotation or the scaling factor is wrong.  <a href="#a792de900907e4e86c48e4a660c9fb24b">More...</a><br/></td></tr>
<tr class="separator:a792de900907e4e86c48e4a660c9fb24b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a355b7e9d1ba0b27dd751cc5de09789f2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a355b7e9d1ba0b27dd751cc5de09789f2">setColor</a> (<a class="el" href="class_model.html#aacca359f52db22626d236f108da4f087">Color</a> color)</td></tr>
<tr class="memdesc:a355b7e9d1ba0b27dd751cc5de09789f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the models color.  <a href="#a355b7e9d1ba0b27dd751cc5de09789f2">More...</a><br/></td></tr>
<tr class="separator:a355b7e9d1ba0b27dd751cc5de09789f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8216b9b38a0184e26c879d304086da86"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a8216b9b38a0184e26c879d304086da86">setPosition</a> (int globalX, int globalY, int globalZ)</td></tr>
<tr class="memdesc:a8216b9b38a0184e26c879d304086da86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a new global position (world coordinates) for the model.  <a href="#a8216b9b38a0184e26c879d304086da86">More...</a><br/></td></tr>
<tr class="separator:a8216b9b38a0184e26c879d304086da86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7b168fc3a84f9ac2b558d1019869ca7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac7b168fc3a84f9ac2b558d1019869ca7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#ac7b168fc3a84f9ac2b558d1019869ca7">draw</a> ()</td></tr>
<tr class="memdesc:ac7b168fc3a84f9ac2b558d1019869ca7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws the model at configured world coordinates. <br/></td></tr>
<tr class="separator:ac7b168fc3a84f9ac2b558d1019869ca7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:aca2e081b66d5111459317072dc533227"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aca2e081b66d5111459317072dc533227"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#aca2e081b66d5111459317072dc533227">m_file</a></td></tr>
<tr class="memdesc:aca2e081b66d5111459317072dc533227"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filename (an path) relative to the executable, which contains the meshes. <br/></td></tr>
<tr class="separator:aca2e081b66d5111459317072dc533227"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2abb95bc557c4af99509a47b43c97fed"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2abb95bc557c4af99509a47b43c97fed"></a>
<a class="el" href="class_model.html#aacca359f52db22626d236f108da4f087">Color</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a2abb95bc557c4af99509a47b43c97fed">m_color</a></td></tr>
<tr class="memdesc:a2abb95bc557c4af99509a47b43c97fed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Color of the model. <br/></td></tr>
<tr class="separator:a2abb95bc557c4af99509a47b43c97fed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89f2ece5bd704ced1eb2e2235989aa5f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a89f2ece5bd704ced1eb2e2235989aa5f"></a>
<a class="el" href="struct_model_1_1_position.html">Position</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a89f2ece5bd704ced1eb2e2235989aa5f">m_position</a></td></tr>
<tr class="memdesc:a89f2ece5bd704ced1eb2e2235989aa5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The model's position in world coordinates. <br/></td></tr>
<tr class="separator:a89f2ece5bd704ced1eb2e2235989aa5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3d03aac91c9ed42e4f833eac367ac9b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac3d03aac91c9ed42e4f833eac367ac9b"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#ac3d03aac91c9ed42e4f833eac367ac9b">m_correctScaling</a></td></tr>
<tr class="memdesc:ac3d03aac91c9ed42e4f833eac367ac9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scaling factor of the model. <br/></td></tr>
<tr class="separator:ac3d03aac91c9ed42e4f833eac367ac9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a6948885f6260def88010036ba4cf34"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3a6948885f6260def88010036ba4cf34"></a>
<a class="el" href="struct_model_1_1_position.html">Position</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a3a6948885f6260def88010036ba4cf34">m_correctPosition</a></td></tr>
<tr class="memdesc:a3a6948885f6260def88010036ba4cf34"><td class="mdescLeft">&#160;</td><td class="mdescRight">The local correction values for correcting unproper model coordinates. <br/></td></tr>
<tr class="separator:a3a6948885f6260def88010036ba4cf34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a932504cc145df6c63d0be308cd0a48a6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a932504cc145df6c63d0be308cd0a48a6"></a>
<a class="el" href="struct_model_1_1_position.html">Position</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a932504cc145df6c63d0be308cd0a48a6">m_correctRotation</a></td></tr>
<tr class="memdesc:a932504cc145df6c63d0be308cd0a48a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">The local correction values for correcting unproper model rotation. <br/></td></tr>
<tr class="separator:a932504cc145df6c63d0be308cd0a48a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99dda3243f3bc3308b7b89e06df5a8c3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a99dda3243f3bc3308b7b89e06df5a8c3"></a>
AssimpHelperPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_model.html#a99dda3243f3bc3308b7b89e06df5a8c3">model</a></td></tr>
<tr class="memdesc:a99dda3243f3bc3308b7b89e06df5a8c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to the <a class="el" href="class_assimp_helper.html" title="Assimp wrapper class to handle scene modeling in an more comfortable way. ">AssimpHelper</a>, which holds the meshes. <br/></td></tr>
<tr class="separator:a99dda3243f3bc3308b7b89e06df5a8c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Representing a chess figure (e.g. </p>
<p>King, Queen, ...). </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="acc072b537a6806019759cd562d80a25e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Model::Model </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>file</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Loads the model from the filesystem. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">file</td><td>The filename with directory relative to the game's executable file. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a355b7e9d1ba0b27dd751cc5de09789f2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Model::setColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_model.html#aacca359f52db22626d236f108da4f087">Color</a>&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the models color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>The color of the model. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a792de900907e4e86c48e4a660c9fb24b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Model::setCorrectionValues </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>localX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>localY</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>localZ</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>scaleFactor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rotateX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rotateY</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rotateZ</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Corrects the model positioning if the model (in the given file) is not proper located at 0/0/0 local space coordinates, the rotation or the scaling factor is wrong. </p>
<dl class="section note"><dt>Note</dt><dd>This should only be used if there's no proper model file available. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">localX</td><td>Sets the local x coordinate. </td></tr>
    <tr><td class="paramname">localY</td><td>Sets the local y coordinate. </td></tr>
    <tr><td class="paramname">localZ</td><td>Sets the local z coordinate. </td></tr>
    <tr><td class="paramname">scaleFactor</td><td>The scaling factor to shrink or enlarge. </td></tr>
    <tr><td class="paramname">rotateX</td><td>The rotation in degree along the x axis. </td></tr>
    <tr><td class="paramname">rotateY</td><td>The rotation in degree along the y axis. </td></tr>
    <tr><td class="paramname">rotateZ</td><td>The rotation in degree along the z axis. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a8216b9b38a0184e26c879d304086da86"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Model::setPosition </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>globalX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>globalY</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>globalZ</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets a new global position (world coordinates) for the model. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">globalX</td><td>The global x coordinate. </td></tr>
    <tr><td class="paramname">globalY</td><td>The global y coordinate. </td></tr>
    <tr><td class="paramname">globalZ</td><td>The global z coordinate. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>S:/dev/3dchess/src/gui/<a class="el" href="_model_8h_source.html">Model.h</a></li>
<li>S:/dev/3dchess/src/gui/Model.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Mar 9 2014 23:13:00 for 3dchess by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
